package com.zb.sannuo.maintenance.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zb.sannuo.common.domain.Menu;
import com.zb.sannuo.common.domain.search.SystemSettingsSearch;
import com.zb.sannuo.maintenance.dao.MenuMapper;
import com.zb.sannuo.maintenance.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MenuServiceImpl implements MenuService{
    @Resource
    private MenuMapper menuMapper;


    @Override
    public Page selectListMenu(int current, int number) {
        Page page = new Page(current,number);
        return page.setRecords(menuMapper.queryMenu(page));
    }

    @Override
    public int deleteMenuById(Integer menuId) {
        return menuMapper.deleteMenuById(menuId);
    }

    @Override
    public int addMenus(Menu menu) {
        return menuMapper.addMenus(menu);
    }

    @Override
    public int updateMenus(Menu menu) {
        return menuMapper.updateMenus(menu);
    }
}
